import request from '@/utils/request';
/*
 * 字典管理接口
 */

//列表
export async function cptList(params: any): Promise<any> {
  return request('/api/cpt', {
    method: 'GET',
    params: params,
  });
}
//新增
export async function cptAdd(params: any): Promise<any> {
  return request('/api/cpt', {
    method: 'POST',
    data: params,
  });
}
//修改
export async function cptEdit(params: any): Promise<any> {
  return request(`/api/cpt`, {
    method: 'PUT',
    data: params,
  });
}

//删除
export async function cptDelete(params: any): Promise<any> {
  return request(`/api/cpt`, {
    method: 'DELETE',
    params: params,
  });
}
//上传图片

export async function cptUpload(formData: any): Promise<any> {
  return request('/api/photo', {
    method: 'POST',
    data: formData,
  });
}
